<?php include($_SERVER['DOCUMENT_ROOT'].'/config.php'); ?>
<?php header("Content-Type: application/xml; charset=UTF-8"); ?>
<?php print('<?xml version="1.0" encoding="'.CHARSET.'"?>'); ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

    <channel>
        <atom:link href="http://softsaurus.org/feedgen" rel="self" type="application/rss+xml" />
        <title>Softsaurus</title>
        <link>http://www.softsaurus.org</link>
        <description>Bringing you the best and latest on all technology</description>
        <lastBuildDate><?php print(date('r')); ?></lastBuildDate>
        <?
        
        include($classes_path.'/class.feedCreator.php');
        $newsFeed = new feedCreator();
        $newsItem = $newsFeed->get_feedItems();
        foreach($newsItem as $item)
        {
            print('<item>'.PHP_EOL);
            print('<title>'.htmlspecialchars($item['title']).'</title>'.PHP_EOL);
            print('<link>http://softsaurus.org/page/2/news/article/'.$item['id'].'/'.utf8_encode(htmlspecialchars(strtolower(str_replace( " ", "-", $item['title'])),ENT_NOQUOTES,'utf-8')).'</link>'.PHP_EOL);
            print('<guid>http://softsaurus.org/page/2/news/article/'.$item['id'].'/'.utf8_encode(htmlspecialchars(strtolower(str_replace( " ", "-", $item['title'])),ENT_NOQUOTES,'utf-8')).'</guid>'.PHP_EOL);
            print('<description>'.htmlspecialchars($item['summary']).'</description>'.PHP_EOL);
            print('<pubDate>'.$item['time'].'</pubDate>'.PHP_EOL);
            print('</item>'.PHP_EOL);
        }
        ?>
    </channel>
</rss>
